-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update gtm_datalayer.html #206
Conversation
Fix syntax. Validated via JSON lint.
Update version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for quick action! Looks good to me.
@@ -11,14 +11,14 @@ | |||
|
|||
<script type="application/ld+json" class="jsonld-dataset"> | |||
dataLayer = [{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to push this object TO anything?
is datalayer
created already or do we need to instantiate the var?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@btylerburton This would be the next thing I try if the syntax fixes dont work. Made comment here: GSA/data.gov#4783 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if window.dataLayer
exists already this would replace it with this. Typically, you'd push so as not to wipe/replace anything pre-existing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point. I don't think that the dataLayer
exists prior, but I'm not sure how to test that. Definitely very open to advice/contributions for the front end stuff.
Fix syntax. Validated via JSON lint.